/**
 * 
 */
package praktikumid.w09.p3;

import java.awt.BorderLayout;
import java.awt.Container;

import javax.swing.JButton;
import javax.swing.JFrame;

/**
 * @author Aleksandr
 *
 */
public class BorderLayoutDemo extends JFrame {

	/**
	 * @param args parameters
	 */
	public static void main(String[] args) {
		
		JFrame demo = new BorderLayoutDemo();
		demo.setTitle("BorderLayout demo");
		demo.setSize(300,200);
		demo.setVisible(true);
		
		Container pane = demo.getContentPane();
		BorderLayout layout = new BorderLayout();
		layout.setHgap(10);
		layout.setVgap(20);
		pane.setLayout(layout);
		
		/*
		 * Placing buttons in various positions
		 */
		pane.add(new JButton("PAGE_START"), BorderLayout.PAGE_START);
		pane.add(new JButton("PAGE_END"), BorderLayout.PAGE_END);
		pane.add(new JButton("LINE_START"), BorderLayout.LINE_START);
		pane.add(new JButton("LINE_END"), BorderLayout.LINE_END);
		pane.add(new JButton("CENTER"), BorderLayout.CENTER);

	}

}
